import { HttpStatusCode } from 'solid-start/server'; import { Description, Property, Qwik, SolidPreactOrReact, Title, } from '~/components';
<Title>zodField$</Title> Creates a validation functions that parses the Zod schema of a field.Creates a validation functions that parses the Zod schema of a field.
const validate = zodField$(schema);
schema
<Property {...properties.schema} />
validate
<Property {...properties.validate} />
This page is exclusively for the Qwik library of Modular Forms.
export const properties = { schema: { type: { type: 'custom', name: 'MaybeFunction', href: '../MaybeFunction', generics: [ { type: 'custom', name: 'ZodType', generics: [ 'any', 'any', { type: 'custom', name: 'FieldValue', href: '../FieldValue', }, ], }, ], }, }, validate: { type: { type: 'custom', name: 'QRL', generics: [ { type: 'function', params: [ { name: 'value', type: { type: 'custom', name: 'FieldValue', href: '../FieldValue', }, }, ], return: 'string', }, ], }, }, };